﻿using System;
using System.Reflection;
using Microsoft.Xna.Framework;

namespace Narwhunderful.Aphelia.Framework
{

    public class Game : Microsoft.Xna.Framework.Game
    {

        static Game _current = null;
        public static Game Current
        {
            get
            {
                if (_current == null) _current = new Game();
                return _current;
            }
            set
            {
                _current = value;
            }
        }

        GraphicsDeviceManager _graphics;
        public GraphicsDeviceManager GraphicsDeviceManager
        {
            get
            {
                return _graphics;
            }
        }

        public Game()
            : base()
        {
            _current = this;
            _graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        GameTime _gameTime = new GameTime();
        public GameTime GameTime
        {
            get
            {
                return _gameTime;
            }
            set
            {
                _gameTime = value;
            }
        }

        protected override void Update(GameTime gameTime)
        {
            _gameTime = gameTime;
            base.Update(gameTime);
        }
    }

}
